package com.ruoyi.admin.domain.vo.request.scheduling;

import com.ruoyi.admin.domain.entity.SchedulingModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;
import org.springframework.beans.BeanUtils;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;


/**
 * 排单添加参数实体
 *
 * @author jianhan
 * @date 2023-02-06 17:14:31
 */
@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class SchedulingUpdateRequest {


    @ApiModelProperty(value = "主键", required = true)
    private Long id;

    @ApiModelProperty(value = "货号id", required = true)
    private Long articleId;

    @ApiModelProperty(value = "客户供应商id", required = true)
    private Long supplierId;

    @ApiModelProperty(value = "订单编号", required = true)
    private String orderNumber;

    @ApiModelProperty(value = "类型1采购 2销售", required = true)
    private String type;

    @ApiModelProperty(value = "码数", required = true)
    private String size;

    @ApiModelProperty(value = "数量", required = true)
    private Long number;

    @ApiModelProperty(value = "单价", required = true)
    private BigDecimal price;

    @ApiModelProperty(value = "总价", required = true)
    private BigDecimal totalPrice;

    @ApiModelProperty(value = "状态（0正在处理 1已处理 2已撤销）", required = true)
    private String status;

    @ApiModelProperty(value = "备注", required = true)
    private String remark;

    @ApiModelProperty(value = "删除标志（0代表存在 1代表删除）", required = true)
    private Boolean delFlag;

    /**
     * 获取实体对象
     *
     * @return 对象
     * @author jianhan
     * @date 2023-02-06 17:14:31
     **/
    @ApiModelProperty(hidden = true)
    public SchedulingModel getSchedulingModel() {
        SchedulingModel schedulingModel = new SchedulingModel();
        BeanUtils.copyProperties(this, schedulingModel);
        return schedulingModel;
    }

}
